﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Modifier un livre
   
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <% Html.RenderPartial("../Oeuvres/Layout/admin_menu"); %>	
    <h2>Modifier un livre</h2>
    
   <% if (ViewData.Count!=0){%>
    <div class="alert alert-success"> <%: ViewData["message"] %>	</div>
   <% }%>
   
     <form class="form-horizontal"  action="/Admin/Books/EditBook/<%= Model[0].id %>" method="post">
        <div class="control-group">
            <label class="control-label">Titre</label>
            <div class="controls">
                <input type="text" name="titre" value="<%= Model[0].titre %>" />
            </div>
        </div>
        
         <div class="control-group">
            <label class="control-label">Auteur</label>
            <div class="controls">
               <input type="text" name="auteur" value="<%= Model[0].auteur %>"/>                
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Date de publication</label>
            <div class="controls">
               <p><input type="text" name = "date_publication" class="datepicker"value="<%= Model[0].date_publication %>" /></p>
            </div>
        </div>
         <div class="control-group">
            <label class="control-label">Date d'édition</label>
            <div class="controls">           
                  <p><input type="text" name = "date_edition" class="datepicker" value="<%= Model[0].date_edition %>" /></p>     
            </div>
            
        </div>
        <div class="control-group">
            <label class="control-label">Nombre de pages</label>
            <div class="controls">
                <input type="text" name="nb_pages" value="<%= Model[0].nb_pages%>"/>  
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <button class="btn btn-info" type="submit"><i class="icon-refresh icon-white"></i> Mettre a jour</button>
            </div>
        </div>
    </form>

</asp:Content>
